<?php

namespace app\admin\controller\goodshandle;

use app\common\controller\Backend;

/**
 * 商品属性管理
 *
 * @icon fa fa-circle-o
 */
class GoodsAttr extends Backend
{
    
    /**
     * Attr模型对象
     * @var \app\admin\model\Attr
     */
    protected $model = null;

    public function _initialize()
    {
        parent::_initialize();
        $this->model = model('goodsAttr');

    }

    public function getAttrByGoodsId(){
        $goods_id = $this->request->request('goods_id');
        $data = Db::name('goods_attr')->where(['goods_id' => $goods_id])->select();

        return json(['code' => 1,'msg'=>'','data' =>$data]);
    }
}